package com.wangshouyu.mp.media;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
import com.wangshouyu.mp.base.response.BaseResponse;

import java.util.List;
import java.util.Objects;

/**
 * @author 王守钰
 * @date 2020年12月22日 16:04
 * @description 素材信息
 */
public class MediaListResponse extends BaseResponse {

    /**
     * 素材id
     */
    @SerializedName(value = "total_count")
    @JsonProperty(value = "total_count")
    @JSONField(name = "total_count")
    private Long totalCount;

    /**
     * 素材id
     */
    @SerializedName(value = "item_count")
    @JsonProperty(value = "item_count")
    @JSONField(name = "item_count")
    private Long itemCount;

    /**
     * 素材id
     */
    private List<MediaItem> item;

    public Long getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(Long totalCount) {
        this.totalCount = totalCount;
    }

    public Long getItemCount() {
        return itemCount;
    }

    public void setItemCount(Long itemCount) {
        this.itemCount = itemCount;
    }

    public List<MediaItem> getItem() {
        return item;
    }

    public void setItem(List<MediaItem> item) {
        this.item = item;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        MediaListResponse mediaList = (MediaListResponse) o;
        return Objects.equals(totalCount, mediaList.totalCount) && Objects.equals(itemCount, mediaList.itemCount) && Objects.equals(item, mediaList.item);
    }

    @Override
    public int hashCode() {
        return Objects.hash(totalCount, itemCount, item);
    }

    @Override
    public String toString() {
        return "MediaList{" +
                "totalCount=" + totalCount +
                ", itemCount=" + itemCount +
                ", item=" + item +
                '}';
    }
}
